Method and Device for Controlling Power Consumption

ABSTRACT

The present disclosure relates to a method and a device for controlling power consumption of an electronic device, which belongs to the technical field of smart devices. The method includes determining a type of an operating system of the electronic device, determining a monitoring scheme based on the type of operating system, monitoring in real time whether the operating system currently has a task to perform based on the determined monitoring scheme, and switching the operating system to a reduced power mode from a normal operation mode when the system currently has no task to perform. In the present disclosure, a common power consumption management can be implemented in uniform and brief software architecture. It can facilitate development of a framework, distribution of SDK. Moreover, it can eliminate the need to analyze specific operation characteristics of the devices, independent of the functions of the devices, broadly and flexibly applicable to a variety of devices.

CROSS-REFERENCE TO RELATED APPLICATIONS

The present application is based upon and claims priority to ChinesePatent Application No. 201510077297.6, filed Feb. 13, 2015, the entirecontents of which are incorporated herein by reference.

TECHNICAL FIELD

The present disclosure generally relates to the technical field of smartdevices, and more particularly, to a method and a device for controllingpower consumption.

BACKGROUND

Power consumption management is very important for embedded systems,especially for small battery-powered devices. Longer standby time is animportant factor for excellent user experience. Therefore, manufacturersof various devices try their best to optimize power consumption. Thepower consumption management scheme can vary depending on differentdevices and different application situations.

Currently, a commonly used power consumption optimization method ismanaging power consumption based on a function of a product. Acorresponding power consumption reducing scheme is designed inconsideration of operation characteristics of a specific product. Forexample, for an attitude detector, the sampling of the sensor can beceased when the attitude detector is motionless for a long time, so asto reduce the power consumption of the attitude detector.

SUMMARY

According to a first aspect of embodiments of the present disclosure,there is provided a method for controlling the power consumption of anelectronic device by a power control device, including determining atype of an operating system of the electronic device, determining amonitoring scheme based on the type of operating system, monitoring inreal time whether the operating system currently has a task to performbased on the determined monitoring scheme, and switching the operatingsystem to a reduced power mode from a normal operation mode when theoperating system currently has no task to perform.

According to a second aspect of embodiments of the present disclosure,there is provided a power control device for controlling powerconsumption of an electronic device, including a processor, and a memoryfor storing instructions executable by the processor. The processor isconfigured to perform determining a type of an operating system of theelectronic device, determining a monitoring scheme based on the type ofoperating system, monitoring in real time whether the operating systemcurrently has a task to perform based on the determined monitoringscheme, and switching the operating system to a reduced power mode froma normal operation mode when the operating system currently has no taskto perform.

According to a third aspect of embodiments of the present disclosure,there is provided a non-transitory computer-readable storage mediumstoring instructions that, when being executed by a processor of a powercontrol device, cause the power control device to perform determining atype of an operating system of an electronic device, determining amonitoring scheme based on the type of operating system, monitoring inreal time whether the operating system currently has a task to performbased on the determined monitoring scheme, and switching the operatingsystem to a reduced power mode from a normal operation mode when theoperating system currently has no task to perform.

It is to be understood that both the foregoing general description andthe following detailed description are exemplary and explanatory onlyand are not restrictive of the invention, as claimed.

BRIEF DESCRIPTION OF THE DRAWINGS

The accompanying drawings, which are incorporated in and constitute apart of this specification, illustrate embodiments consistent with theinvention and, together with the description, serve to explain theprinciples of the invention.

FIG. 1 is a flow chart showing a method for controlling powerconsumption according to an exemplary embodiment.

FIG. 2 is a flow chart showing a method for controlling powerconsumption according to another exemplary embodiment.

FIG. 3 is a flow chart showing a method for controlling powerconsumption according to another exemplary embodiment.

FIG. 4 is a block diagram showing a device for controlling powerconsumption according to another exemplary embodiment.

FIG. 5 is a block diagram showing a device for controlling powerconsumption according to another exemplary embodiment.

FIG. 6 is a block diagram showing a device for controlling powerconsumption according to another exemplary embodiment.

FIG. 7 is a block diagram showing a device for controlling powerconsumption according to another exemplary embodiment.

FIG. 8 is a block diagram showing a device for controlling powerconsumption according to another exemplary embodiment.

FIG. 9 is a block diagram showing a device for controlling powerconsumption according to another exemplary embodiment.

FIG. 10 is a block diagram showing a device for controlling powerconsumption according to another exemplary embodiment.

FIG. 11 is a block diagram showing a device for controlling powerconsumption according to another exemplary embodiment.

FIG. 12 is a block diagram showing a device for controlling powerconsumption according to another exemplary embodiment.

FIG. 13 is a block diagram showing a device for controlling powerconsumption according to another exemplary embodiment.

DETAILED DESCRIPTION

Reference will now be made in detail to exemplary embodiments, examplesof which are illustrated in the accompanying drawings. The followingdescription refers to the accompanying drawings in which the samenumbers in different drawings represent the same or similar elementsunless otherwise represented. The implementations set forth in thefollowing description of exemplary embodiments do not represent allimplementations consistent with the invention. Instead, they are merelyexamples of apparatuses and methods consistent with some aspects relatedto the invention as recited in the appended claims.

The method and device for controlling power consumption involved in thepresent disclosure are applied in an electronic device including but notlimited to: a terminal, a server, a domestic appliance and the like. Theterminal includes but not limited to: a computer, a mobile phone, atablet computer and the like. The domestic appliance includes but notlimited to: a refrigerator, a washing machine, a microwave oven, an airconditioner and the like. A system involved in the present disclosurerefers to an operating system in the electronic device. Optionally, thesystem is an embedded system. The type of the system is not limited. Forexample, the system can be a foreground-background system, or areal-time system supporting preemption, etc.

FIG. 1 is a flow chart showing a method for controlling powerconsumption according to an exemplary embodiment. As shown in FIG. 1,the method is applied in an electronic device, and includes thefollowing steps.

In step S11, a monitoring scheme is determined based on a type of asystem. In the present embodiment, the system refers to an operatingsystem of the electronic device, which includes but not limited to aforeground-background system, or a real-time system supportingpreemption, etc. The monitoring scheme is used to monitor whether thesystem has a task to perform, and the monitoring scheme is differentdepending on a type of the system.

In step S12, it is monitored in real time whether the system currentlyhas a task to perform according to the monitoring scheme. In the presentembodiment, when the system has a task to perform, the power consumptionfor the electronic device should not be reduced, so as to ensure thatthe task can be properly performed. Generally, when the system has notask to perform, the power consumption can be reduced so as to savepower for the electronic device, saving valuable resources.

In step S13, the system is switched to a reduced power mode from anormal operation mode when it is determined in real time that the systemcurrently has no task to perform. In the present embodiment, operationmodes of the system can include a normal operation mode and a reducedpower mode. The system is in the normal operation mode when the systemis performing a task, and the system is in the reduced power mode whenthe system is not performing a task. The system has a lower powerconsumption in the reduced power mode than in the normal operation mode,thereby it can save power and improve the performance of the electronicdevice.

In the present embodiment, when the system is a foreground-backgroundsystem, the monitoring scheme is determined to be a scheme of monitoringin real time whether a task is triggered by an interrupting event inforeground. Alternatively, when the system is a real-time systemsupporting preemption, the monitoring scheme is determined to be ascheme of monitoring in real time a task based on a priority level.

In the present embodiment, optionally, when the system is aforeground-background system, monitoring in real time whether the systemcurrently has a task to perform according to the monitoring scheme caninclude: monitoring in real time in a main cycle of the system whether atask is currently triggered by an interrupting event, when a task istriggered by an interrupting event, determining that the systemcurrently has a task to perform, and when no task is triggered by aninterrupting event, determining that the system currently has no task toperform.

In the present embodiment, optionally, when the system is a real-timesystem supporting preemption, monitoring in real time whether the systemcurrently has a task to perform according to the monitoring scheme caninclude: monitoring in real time for each priority level whether aprocess is triggered, wherein a first process for performing switchingto the reduced power mode has a lowest priority level, when no processother than the first process is triggered, determining that the systemcurrently has no task to perform, and when any process other than thefirst process is triggered, determining that the system currently has atask to perform.

In the present embodiment, optionally, switching the system to a reducedpower mode can include but not limited to one or more of: lowering afrequency of a central processor, lowering a supply voltage to a microcontrol unit (MCU), switching the MCU to a reduced power mode, ceasingpower supply to a designated peripheral device, and ceasing power supplyto a peripheral clock.

In the present embodiment, optionally, the above method can alsoinclude: when an interrupting event occurs, terminating the reducedpower mode and processing the interrupting event.

In the above method provided by the present embodiment, a monitoringscheme is determined based on a type of a system. It is monitored inreal time whether the system currently has a task to perform accordingto the monitoring scheme. The system is switched to a reduced power modewhen it is determined in real time that the system currently has no taskto perform. Thereby, a common power consumption management can beimplemented in uniform and brief software architecture. It canfacilitate development of a framework and Software Development Kit (SDK)of the device. Moreover, it can eliminate the need to analyze specificoperation characteristics of the devices, independent of the functionsof the devices, broadly and flexibly applicable to a variety of devices.

FIG. 2 is a flow chart showing a method for controlling powerconsumption according to another exemplary embodiment. As shown in FIG.2, the method is applied in an electronic device and includes thefollowing steps.

In step S21, when the system is a foreground-background system, themonitoring scheme is determined to be a scheme of monitoring in realtime whether a task is triggered by an interrupting event in foreground.

The foreground-background system refers to a system operating partly inforeground and partly in background. The foreground part is used tomonitor an interrupting event, and the background part is used toperform a specific task. An interrupting event monitored by theforeground part can trigger the background part to perform acorresponding task. A foreground-background system has a main cycle forprocessing schedule of all the tasks. The system also has a task queuein which all the tasks to be performed is waiting to be processed. Themain cycle will invoke a task performing function to process acorresponding task.

In step S22, it is monitored in real time in the main cycle of thesystem whether a task is currently triggered by an interrupting event.When no task is triggered by an interrupting event, it is proceeded tostep S23. When a task is triggered by an interrupting event, it isproceeded to step S25.

In the present embodiment, depending on the type of an interruptingevent, the interrupting event can trigger a task, or does not trigger atask. When a task is triggered by an interrupting event, the task willbe scheduled in a task queue of the main cycle. Thus, it can bedetermined that the system currently has a task to perform. When no taskis triggered by an interrupting event, the task queue of the main cyclewill be empty. Accordingly, it can be determined that the systemcurrently has no task to perform.

In step S23, it is determined that the system currently has no task toperform.

In step S24, the system is switched to a reduced power mode, and theprocedure ends. Switching the system to a reduced power mode can includebut not limited to one or more of: lowering a frequency of a centralprocessor, lowering a supply voltage to a micro control unit (MCU),switching the MCU to a reduced power mode, ceasing power supply to adesignated peripheral device; and ceasing power supply to a peripheralclock. The designated peripheral device can be a peripheral device notin operation. However, the present disclosure is not limited thereto.

In step S25, it is determined that the system currently has a task toperform.

In step S26, the reduced power mode is terminated and the interruptingevent is processed. The procedure ends.

In the present embodiment, optionally, the determination can beperformed in the main cycle of the foreground-background system. Ifthere is a task to be performed in the task queue, a corresponding taskperforming function is invoked to process the corresponding task. Ifthere is no task to be performed in the task queue, a function for areduced power mode is invoked to switch the system to the reduced powermode.

The above procedure can be implemented as the following codes:

While(1) { While(has_task_in_queue(task_queue)) { //when there is a taskin the task queue Execute_task( ) //perform the corresponding task }Enter_lowpower_mode( ); // enter a reduced power mode when there is notask in the task queue }

Wherein, While(1) is a main cycle, While(has_task_in_queue(task_queue))is a processing function of the task queue. In the function, when it isdetermined that there is a task to be performed in the task queue, itwill invoke the function Execute_task( ) to perform the correspondingtask. If the condition that there is a task in the task queue is notsatisfied, the function Enter_lowpower_mode( ) will be performed toswitch the system to the reduced power mode. In the present embodiment,the interrupting event can wake up the system from the reduced powermode, and trigger the system to perform the corresponding task.

In the above method provided by the present embodiment, for aforeground-background system, the monitoring scheme is determined asmonitoring in real time at foreground a task triggered by aninterrupting event. It is monitored in real time whether the systemcurrently has a task triggered by an interrupting event based on thismonitoring scheme. When it is monitored in real time that the systemcurrently has a task to perform, the system is switched to a reducepower mode. Thereby, a common power consumption management can beimplemented in uniform and brief software architecture. It canfacilitate development of a framework, distribution of SDK. It isdesirable providing to a user a project of a software framework that canbe further developed by the user and irrelevant to power management.Moreover, it can eliminate the need to analyze specific operationcharacteristics of the devices, independent of the functions of thedevices, broadly and flexibly applicable to a variety of devices.

FIG. 3 is a flow chart showing a method for controlling powerconsumption according to another exemplary embodiment. As shown in FIG.3, the method is applied in an electronic device and includes thefollowing steps.

In step S31, when the system is a real-time system supportingpreemption, the monitoring scheme is determined to be a scheme ofmonitoring in real time a task based on a priority level. The real-timesystem supporting preemption refers to a system which creates processesof different priority levels to perform tasks, in which a process of ahigher priority level is performed in priority, to ensure that the taskof a higher priority level can be processed in priority.

In step S32, it is monitored in real time whether a process other than afirst process is triggered. The first process for performing switchingthe system to the reduced power mode has a lowest priority level. Whenno process other than the first process is triggered, it is proceeded tostep S33. When any process other than the first process is triggered, itis proceeded to step S35.

In the present embodiment, the first process for performing switchingthe system to the reduced power mode has a lowest priority level, andany process other than the first process has a higher priority levelthan the first process. Thus, only when no process other than the firstprocess is triggered, the first process is performed, and when anyprocess other than the first process is triggered, the first processwill not be performed. In this way, it can be ensured that only when ithas not any task to perform, the system will operate in the reducedpower mode, and thus the normal performances of the tasks will not beinfluenced.

In step S33, it is determined that the system currently has no task toperform.

In step S34, the system is switched to a reduced power mode, and theprocedure ends. Switching the system to a reduced power mode can includebut not limited to one or more of: lowering a frequency of a centralprocessor; lowering a supply voltage to a micro control unit (MCU),switching the MCU to a reduced power mode, ceasing power supply to adesignated peripheral device, and ceasing power supply to a peripheralclock.

In step S35, it is determined that the system currently has a task toperform.

In step S36, the reduced power mode is terminated and the interruptingevent is processed. The procedure ends.

The above process of switching to a reduced power mode provided by thepresent embodiment can be implemented as the following codes:

Void lowest_priority_task( ) { //process function of the process of thelowest priority level While(1) { Enter_low_power_mode( ); //entering thereduced power mode }  }

Wherein, lowest_priority_task( ) is the process of the lowest prioritylevel, which is for triggering switching the system into the reducedpower mode. When no process other than the first process is triggered,this process will be automatically triggered. In this process, thefunction Enter_low_power_mode( ) will be performed to switch the systemto operate in the reduce power mode.

In the real-time system supporting preemption, a process correspondingto an interrupting event has a highest priority level, and when itoccurs, the interrupting event will preempt the priority of the firstprocess, and trigger the process corresponding to the interrupting eventin priority such that the process performs a corresponding function toprocess a task corresponding to the interrupting event. This will wakeup the system from the reduced power mode to ensure the task of a higherpriority level is performed. Such a mechanism that the system will enterthe reduced power mode only when it is idle and has no task to perform.It can facilitate management of power consumption without influencingthe real-time property of the system.

In the above method provided by the present embodiment, for a real-timesystem supporting preemption, the monitoring scheme is determined asmonitoring in real time a task based on a priority level. It ismonitored in real time whether the system currently has a task toperform based on this monitoring scheme, and when it is monitored inreal time that the system currently has a task to perform, the system isswitched to a reduce power mode. Thereby, a common power consumptionmanagement can be implemented in uniform and brief softwarearchitecture. It can facilitate development of a framework, distributionof SDK. Moreover, it can eliminate the need to analyze specificoperation characteristics of the devices, independent of the functionsof the devices, broadly and flexibly applicable to a variety of devices.

FIG. 4 is a block diagram showing a power control device for controllingpower consumption according to another exemplary embodiment. As shown inFIG. 4, the device includes a determining module 121, a monitoringmodule 122 and a switching module 123.

The determining module 121 is configured to determine a monitoringscheme based on a type of an operating system of an electronic device.The monitoring module 122 is configured to monitor in real time whetherthe operating system currently has a task to perform according to themonitoring scheme. The switching module 123 is configured to switch thesystem to a reduced power mode when it is determined in real time thatthe system currently has no task to perform.

Referring to FIG. 5, in the present embodiment, optionally, thedetermining module 121 may include a first determining sub-module 121 aconfigured to, when the operating system is a foreground-backgroundsystem, determine the monitoring scheme as a scheme of monitoring inreal time whether a task is triggered by an interrupting event inforeground.

Referring to FIG. 6, in the present embodiment, optionally, themonitoring module 122 may include a first monitoring sub-module 122 aconfigured to monitor in real time in a main cycle of the system whethera task is currently triggered by an interrupting event. When a task istriggered by an interrupting event, the first monitoring sub-module 122a determines that the system currently has a task to perform. When notask is triggered by an interrupting event, the first monitoringsub-module 122 a determines that the system currently has no task toperform.

Referring to FIG. 7, in the present embodiment, optionally, thedetermining module 121 may include a second determining sub-module 121 bconfigured to, when the system is a real-time system supportingpreemption, determine the monitoring scheme as a scheme of monitoring inreal time a task based on a priority level.

Referring to FIG. 8, in the present embodiment, optionally, themonitoring module 122 may include a second monitoring sub-module 122 bconfigured to monitor in real time for each priority level whether aprocess is triggered, wherein a first process for performing switchingto the reduced power mode has a lowest priority level, when neither ofthe other processes than the first process is triggered, determine thatthe system currently has no task to perform, and when any one of theother processes than the first process is triggered, determine that thesystem currently has a task to perform.

Referring to FIG. 9, in the present embodiment, optionally, theswitching module 123 may include a switching sub-module 123 a configuredto perform one or more of the following when it is monitored in realtime that the system currently has no task to perform: lowering afrequency of a central processor, lowering a supply voltage to a microcontrol unit, switching the micro control unit to a reduced power mode,ceasing power supply to a designated peripheral device; and ceasingpower supply to a peripheral clock.

Referring to FIG. 10, in the present embodiment, optionally, theswitching module 123 is further configured to, when it is monitored inreal time that an interrupting event occurs, terminate the reduced powermode. The above device may also include a processing module 124configured to process the interrupting event monitored in real time.With respect to the devices in the above embodiments, the specificmanners for performing operations for individual modules therein havebeen described in detail in the embodiments regarding the relevantmethods, which will not be elaborated herein.

The above device provided by the present embodiment can be applied inany electronic device including but not limited to a terminal, a server,and a domestic appliance.

In the above device provided by the present embodiment, a monitoringscheme is determined based on a type of an operating system. It ismonitored in real time whether the operating system currently has a taskto perform according to the monitoring scheme. The operating system isswitched to a reduced power mode when it is determined in real time thatthe operating system currently has no task to perform. Thereby, a commonpower consumption management can be implemented in uniform and briefsoftware architecture. It can facilitate development of a framework,distribution of SDK. Moreover, it can eliminate the need to analyzespecific operation characteristics of the devices, independent of thefunctions of the devices, broadly and flexibly applicable to a varietyof devices.

FIG. 11 is a block diagram showing a power control device forcontrolling power consumption according to another exemplary embodiment.As shown in FIG. 11, the power control device includes a processor 701and a memory 702 for storing instructions executable by the processor.The processor 701 is configured to perform determining a type of anoperating system of an electronic device, determining a monitoringscheme based on the type of the operating system, monitoring in realtime whether the operating system currently has a task to perform basedon the determined monitoring scheme, and switching the system to areduced power mode when determining in real time that the systemcurrently has no task to perform.

Determining a monitoring scheme based on a type of a system includeswhen the system is a foreground-background system, determining themonitoring scheme as a scheme of monitoring in real time whether a taskis triggered by an interrupting event in foreground.

Monitoring in real time whether the system currently has a task toperform according to the monitoring scheme includes monitoring in realtime in a main cycle of the system whether a task is currently triggeredby an interrupting event, when a task is triggered by an interruptingevent, determining that the system currently has a task to perform, andwhen no task is triggered by an interrupting event, determining that thesystem currently has no task to perform.

Determining a monitoring scheme based on a type of a system includeswhen the system is a real-time system supporting preemption, determiningthe monitoring scheme as a scheme of monitoring in real time a taskbased on a priority level.

Monitoring in real time whether the system currently has a task toperform according to the monitoring scheme includes monitoring in realtime whether a process other than a first process is triggered. Thefirst process for performing switching to the reduced power mode has alowest priority level, when no process other than the first process istriggered, determining that the system currently has no task to perform,and when a process other than the first process is triggered,determining that the system currently has a task to perform.

Switching the system to a reduced power mode includes one or more of:lowering a frequency of a central processor, lowering a supply voltageto a micro control unit, switching the micro control unit to a reducedpower mode, ceasing power supply to a designated peripheral device, andceasing power supply to a peripheral clock.

The processor 701 is configured to perform when an interrupting eventoccurs, terminating the reduced power mode and processing theinterrupting event.

FIG. 12 is a block diagram of a device 800 for controlling powerconsumption, according to another exemplary embodiment. For example, thedevice 800 may be a mobile phone, a computer, a digital broadcastterminal, a messaging device, a gaming console, a tablet, a medicaldevice, exercise equipment, a personal digital assistant, and the like.

Referring to FIG. 12, the device 800 may include one or more of thefollowing components: a processing component 802, a memory 804, a powercomponent 806, a multimedia component 808, an audio component 810, aninput/output (I/O) interface 812, a sensor component 814, and acommunication component 816.

The processing component 802 typically controls overall operations ofthe device 800, such as the operations associated with display,telephone calls, data communications, camera operations, and recordingoperations. The processing component 802 may include one or moreprocessors 820 to execute instructions to perform all or part of thesteps in the above described methods. Moreover, the processing component802 may include one or more modules which facilitate the interactionbetween the processing component 802 and other components. For instance,the processing component 802 may include a multimedia module tofacilitate the interaction between the multimedia component 808 and theprocessing component 802.

The memory 804 is configured to store various types of data to supportthe operation of the device 800. Examples of such data includeinstructions for any applications or methods operated on the device 800,contact data, phonebook data, messages, pictures, video, etc. The memory804 may be implemented using any type of volatile or non-volatile memorydevices, or a combination thereof, such as a static random access memory(SRAM), an electrically erasable programmable read-only memory (EEPROM),an erasable programmable read-only memory (EPROM), a programmableread-only memory (PROM), a read-only memory (ROM), a magnetic memory, aflash memory, a magnetic or optical disk.

The power component 806 provides power to various components of thedevice 800. The power component 806 may include a power managementsystem, one or more power sources, and any other components associatedwith the generation, management, and distribution of power in the device800.

The multimedia component 808 includes a screen providing an outputinterface between the device 800 and the user. In some embodiments, thescreen may include a liquid crystal display (LCD) and a touch panel(TP). If the screen includes the touch panel, the screen may beimplemented as a touch screen to receive input signals from the user.The touch panel includes one or more touch sensors to sense touches,swipes, and gestures on the touch panel. The touch sensors may not onlysense a boundary of a touch or swipe action, but also sense a period oftime and a pressure associated with the touch or swipe action. In someembodiments, the multimedia component 808 includes a front camera and/ora rear camera. The front camera and the rear camera may receive anexternal multimedia datum while the device 800 is in an operation mode,such as a photographing mode or a video mode. Each of the front cameraand the rear camera may be a fixed optical lens system or have focus andoptical zoom capability.

The audio component 810 is configured to output and/or input audiosignals. For example, the audio component 810 includes a microphone(“MIC”) configured to receive an external audio signal when the device800 is in an operation mode, such as a call mode, a recording mode, anda voice recognition mode. The received audio signal may be furtherstored in the memory 804 or transmitted via the communication component816. In some embodiments, the audio component 810 further includes aspeaker to output audio signals.

The I/O interface 812 provides an interface between the processingcomponent 802 and peripheral interface modules, such as a keyboard, aclick wheel, buttons, and the like. The buttons may include, but are notlimited to, a home button, a volume button, a starting button, and alocking button.

The sensor component 814 includes one or more sensors to provide statusassessments of various aspects of the device 800. For instance, thesensor component 814 may detect an open/closed status of the device 800,relative positioning of components, e.g., the display and the keypad, ofthe device 800, a change in position of the device 800 or a component ofthe device 800, a presence or absence of user contact with the device800, an orientation or an acceleration/deceleration of the device 800,and a change in temperature of the device 800. The sensor component 814may include a proximity sensor configured to detect the presence ofnearby objects without any physical contact. The sensor component 814may also include a light sensor, such as a CMOS or CCD image sensor, foruse in imaging applications. In some embodiments, the sensor component814 may also include an accelerometer sensor, a gyroscope sensor, amagnetic sensor, a pressure sensor, or a temperature sensor.

The communication component 816 is configured to facilitatecommunication, wired or wirelessly, between the device 800 and otherdevices. The device 800 can access a wireless network based on acommunication standard, such as WiFi, 2G, or 3G, or a combinationthereof. In one exemplary embodiment, the communication component 816receives a broadcast signal or broadcast associated information from anexternal broadcast management system via a broadcast channel. In oneexemplary embodiment, the communication component 816 further includes anear field communication (NFC) module to facilitate short-rangecommunications. For example, the NFC module may be implemented based ona radio frequency identification (RFID) technology, an infrared dataassociation (IrDA) technology, an ultra-wideband (UWB) technology, aBluetooth (BT) technology, and other technologies.

In exemplary embodiments, the device 800 may be implemented with one ormore application specific integrated circuits (ASICs), digital signalprocessors (DSPs), digital signal processing devices (DSPDs),programmable logic devices (PLDs), field programmable gate arrays(FPGAs), controllers, micro-controllers, microprocessors, or otherelectronic components, for performing the method provided by any of theabove embodiments.

In exemplary embodiments, there is also provided a non-transitorycomputer-readable storage medium including instructions, such asincluded in the memory 804, executable by the processor 820 in thedevice 800, for performing the above-described methods. For example, thenon-transitory computer-readable storage medium may be a ROM, a RAM, aCD-ROM, a magnetic tape, a floppy disc, an optical data storage device,and the like.

In the above non-transitory computer-readable storage medium provided bythe present embodiment, a monitoring scheme is determined based on atype of an operating system. It is monitored in real time whether theoperating system currently has a task to perform according to themonitoring scheme, and the system is switched to a reduced power modewhen it is determined in real time that the system currently has no taskto perform. Thereby, a common power consumption management can beimplemented in uniform and brief software architecture. It canfacilitate development of a framework, distribution of SDK. Moreover, itcan eliminate the need to analyze specific operation characteristics ofthe devices, independent of the functions of the devices, broadly andflexibly applicable to a variety of devices.

FIG. 13 is a block diagram of a device 1900 for controlling powerconsumption according to an exemplary embodiment. For example, thedevice 1900 may be provided as a server. Referring to FIG. 13, thedevice 1900 includes a processing component 1922 that further includesone or more processors, and memory resources represented by a memory1932 for storing instructions executable by the processing component1922, such as application programs. The application programs stored inthe memory 1932 may include one or more modules each corresponding to aset of instructions. Further, the processing component 1922 isconfigured to execute the instructions to perform the method provided byany of the above embodiments.

The device 1900 may also include a power component 1926 configured toperform power management of the device 1900, wired or wireless networkinterface(s) 1950 configured to connect the device 1900 to a network,and an input/output (I/O) interface 1958. The device 1900 may operatebased on an operating system stored in the memory 1932, such as WindowsServer™, Mac OS X™, Unix™, Linux™, FreeBSD™, or the like.

In the above device provided by the present embodiment, a monitoringscheme is determined based on a type of an operating system. It ismonitored in real time whether the system currently has a task toperform according to the monitoring scheme, The system is switched to areduced power mode when it is determined in real time that the systemcurrently has no task to perform. Thereby, a common power consumptionmanagement can be implemented in uniform and brief softwarearchitecture. It can facilitate development of a framework, distributionof SDK. Moreover, it can eliminate the need to analyze specificoperation characteristics of the devices, independent of the functionsof the devices, broadly and flexibly applicable to a variety of devices.

Other embodiments of the invention will be apparent to those skilled inthe art from consideration of the specification and practice of theinvention disclosed here. This application is intended to cover anyvariations, uses, or adaptations of the invention following the generalprinciples thereof and including such departures from the presentdisclosure as come within known or customary practice in the art. It isintended that the specification and examples be considered as exemplaryonly, with a true scope and spirit of the invention being indicated bythe following claims.

It will be appreciated that the present invention is not limited to theexact construction that has been described above and illustrated in theaccompanying drawings, and that various modifications and changes can bemade without departing from the scope thereof. It is intended that thescope of the invention only be limited by the appended claims.

What is claimed is:
 1. A method for controlling the power consumption ofan electronic device by a power control device, comprising: determininga type of an operating system of the electronic device; determining amonitoring scheme based on the type of operating system; monitoring inreal time whether the operating system currently has a task to performbased on the determined monitoring scheme; and switching the operatingsystem to a reduced power mode from a normal operation mode when theoperating system currently has no task to perform.
 2. The method ofclaim 1, wherein the operating system of the electronic device isdetermined to be a foreground-background system, and the determinedmonitoring scheme is to monitor in real time whether an interruptingevent is triggered in foreground.
 3. The method of claim 2, whereinmonitoring in real time comprises: monitoring in real time in a maincycle of the operating system whether a task is currently triggered byan interrupting event; when a task is triggered by an interruptingevent, determining that the operating system currently has a task toperform; and when no task is triggered by an interrupting event,determining that the system currently has no task to perform.
 4. Themethod of claim 1, wherein the operating system of the electronic deviceis determined to be a real-time system supporting preemption, and thedetermined monitoring scheme is to monitor in real time a task based ona priority level.
 5. The method of claim 4, wherein monitoring in realtime whether the operating system currently has a task to perform basedon the determined monitoring scheme comprises: determining in real timewhether a process other than a first process is triggered, wherein thefirst process performs switching the operating system to the reducedpower mode and has a lowest priority level; when no process other thanthe first process is triggered, determining that the system currentlyhas no task to perform; and when a process other than the first processis triggered, determining that the system currently has a task toperform.
 6. The method of claim 1, wherein switching the system to areduced power mode comprises one or more of: lowering a frequency of acentral processor, lowering a supply voltage to a micro control unit,switching the micro control unit to a reduced power mode, ceasing powersupply to a designated peripheral device, and ceasing power supply to aperipheral clock.
 7. The method of claim 1, wherein the method furthercomprises: when an interrupting event occurs, terminating the reducedpower mode and processing the interrupting event.
 8. A power controldevice for controlling power consumption of an electronic device,comprising: a processor; and a memory for storing instructionsexecutable by the processor, wherein the processor is configured toperform: determining a type of an operating system of the electronicdevice; determining a monitoring scheme based on the type of theoperating system; monitoring in real time whether the operating systemcurrently has a task to perform based on the determined monitoringscheme; and switching the operating system to a reduced power mode froma normal operation mode when the operating system currently has no taskto perform.
 9. The power control device of claim 8, wherein theoperating system of the electronic device is determined to be aforeground-background system, and the determined monitoring scheme is tomonitor whether an interrupting event is triggered in foreground. 10.The power control device of claim 9, wherein monitoring in real timecomprises: monitoring in real time in a main cycle of the operatingsystem whether a task is currently triggered by an interrupting event;when a task is triggered by an interrupting event, determining that theoperating system currently has a task to perform; and when no task istriggered by an interrupting event, determining that the operatingsystem currently has no task to perform.
 11. The power control device ofclaim 8, wherein the operating system of the electronic device isdetermined to be a real-time system supporting preemption, and thedetermined monitoring scheme is to monitor in real time a task based ona priority level.
 12. The power control device of claim 11, whereinmonitoring in real time whether the operating system currently has atask to perform based on the determined monitoring scheme comprises:determining in real time whether a process other than a first process istriggered, wherein the first process performs switching the operatingsystem to the reduced power mode and has a lowest priority level; whenno process other than the first process is triggered, determining thatthe system currently has no task to perform; and when a process otherthan the first process is triggered, determining that the systemcurrently has a task to perform.
 13. The power control device of claim8, wherein switching the system to a reduced power mode comprises one ormore of: lowering a frequency of a central processor, lowering a supplyvoltage to a micro control unit, switching the micro control unit to areduced power mode, ceasing power supply to a designated peripheraldevice, and ceasing power supply to a peripheral clock.
 14. The powercontrol device of claim 8, wherein the processor is further configuredto perform: when an interrupting event occurs, terminating the reducedpower mode and processing the interrupting event.
 15. A non-transitorycomputer-readable storage medium storing instructions that, when beingexecuted by a processor of a power control device, cause the powercontrol device to perform: determining a type of an operating system ofan electronic device; determining a monitoring scheme based on the typeof operating system; monitoring in real time whether the operatingsystem currently has a task to perform based on the determinedmonitoring scheme; and switching the operating system to a reduced powermode from a normal operation mode when the operating system currentlyhas no task to perform.
 16. The non-transitory computer-readable storagemedium of claim 15, wherein the operating system of the electronicdevice is determined to be a foreground-background system, and when thedetermined monitoring scheme is to monitor in real time whether aninterrupting event is triggered in foreground.
 17. The non-transitorycomputer-readable storage medium of claim 16, wherein monitoring in realtime comprises: monitoring in real time in a main cycle of the operatingsystem whether a task is currently triggered by an interrupting event;when a task is triggered by an interrupting event, determining that theoperating system currently has a task to perform; and when no task istriggered by an interrupting event, determining that the systemcurrently has no task to perform.
 18. The non-transitorycomputer-readable storage medium of claim 15, wherein the operatingsystem of the electronic device is determined to be a real-time systemsupporting preemption, and the determined monitoring scheme is tomonitor in real time a task based on a priority level.
 19. Thenon-transitory computer-readable storage medium of claim 18, whereinmonitoring in real time whether the operating system currently has atask to perform based on the determined monitoring scheme comprises:determining in real time whether a process other than a first process istriggered, wherein the first process performs switching the operatingsystem to the reduced power mode and has a lowest priority level; whenno process other than the first process is triggered, determining thatthe system currently has no task to perform; and when a process otherthan the first process is triggered, determining that the systemcurrently has a task to perform.
 20. The non-transitorycomputer-readable storage medium of claim 15, wherein the power controldevice is further caused to perform: when an interrupting event occurs,terminating the reduced power mode and processing the interruptingevent.